package top.dark.design.patterns.adapter.objectadapter;

/**
 * Author: Darkn
 * description:
 * Create Time: 2021/4/25 19:49
 */
public class Phone {
    public void charging(IVoltage5V iVoltage5V) {
        if (iVoltage5V.output5V() == 5) {
            System.out.println(" 电压为5V，可以充电了~~~");
        } else if (iVoltage5V.output5V() > 5) {
            System.out.println(" 电压大于5V，不可以充电~~~");
        }
    }
}
